import { TokenLogQueryDto } from '@/dtos';
import { TokenLogService } from '@/services/token-log.service';
import { ok } from '@/utils';
import { Body, Controller, Post } from '@nestjs/common';
import { BaseController } from './base.controller';

@Controller('token-log')
export class TokenLogController extends BaseController {
  constructor(private readonly tokenLogService: TokenLogService) {
    super();
  }

  @Post('admin/query')
  async query(@Body() dto: TokenLogQueryDto) {
    return ok(await this.tokenLogService.query(dto));
  }
}
